from db.db import DB

db = DB('advanced')

# 删除表数据:delete from 表名 where表达式
title1 = input('请输入要删除的标题:')

sql1 = f'delete from company_news1 where title= %s'
# 或者 sql1 = f'delete from company_news1 where title= \'{title1}\''
#     db.write(sql1)
db.write(sql1, title1)

# 查询验证
sql2 = 'select * from company_news1'
print(db.read(sql2))
